
import request from '../../../apis/axios'
// 获取远程数据
export function getRemoteData(method = 'get', path, params,apiHeader) {
  let data = method.toLocaleLowerCase() === 'get' ? 'params' : 'data'  
  let config ={
    url: path,
    method: method,
    [data]: params
  }
  if(apiHeader &&  Object.keys(apiHeader).length>0) config.headers = apiHeader
  return request(config)
}